package com.rockcent.mall.lib.repository;

import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.MarketMerchantProductSales;
import com.rockcent.mall.lib.domain.enumclass.MerchantCooperationType;
import com.rockcent.mall.lib.dto.MarketMerchantProductSalesDto;
import com.rockcent.mall.lib.dto.ProductDto;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Created by HK on 16/9/20.
 *
 * 分销产品自定义
 */
public interface MarketMerchantProductSalesRepositoryCustom {

    /**
     * 查找分销商/供应商 分销的产品列表
     * @return
     */
    List<MarketMerchantProductSalesDto> findDtoByDistributorMerchantIdAndSupplierMerchantIdAndIsDelete(MerchantCooperationType merchantCooperationType, Long distributorMerchantId, Long supplierMerchantId, String isDelete);

    MarketMerchantProductSales findByProductIdAndSupplierMerchantIdAndDistributorMerchantIdAndIsDeleteInPass(Long productId, Long merchantId, Long distributorMerchantId, Whether no);
}
